package com.ydkj.a37e_mall.Classes.Applicatiom;

import android.app.Activity;
import android.graphics.Bitmap;
import android.support.multidex.MultiDexApplication;

import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.ydkj.a37e_mall.Classes.Model.Request.BusinessqfcatReq;
import com.ydkj.a37e_mall.Classes.Model.Request.IdcardReq;
import com.ydkj.a37e_mall.Classes.Model.Request.StorethumbnailReq;
import com.ydkj.a37e_mall.Classes.Model.Request.StroreimgReq;
import com.ydkj.a37e_mall.Classes.Model.Response.LoginResp;
import com.ydkj.a37e_mall.R;

import java.util.LinkedList;
import java.util.List;

/**
 * Created by Administrator on 2017/1/17.
 */

public class MyApplication extends MultiDexApplication {
    private static MyApplication instance;
    private String user_procotol_url, about_us_url;
    private String share_url = "", share_content = "";
    private String version, download, message;
    private LoginResp.ResultEntity.DataEntity dataEntity;


    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getDownload() {
        return download;
    }

    public void setDownload(String download) {
        this.download = download;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getUser_procotol_url() {
        return user_procotol_url;
    }

    public void setUser_procotol_url(String user_procotol_url) {
        this.user_procotol_url = user_procotol_url;
    }

    public String getAbout_us_url() {
        return about_us_url;
    }

    public void setAbout_us_url(String about_us_url) {
        this.about_us_url = about_us_url;
    }

    public String getShare_url() {
        return share_url;
    }

    public void setShare_url(String share_url) {
        this.share_url = share_url;
    }

    public String getShare_content() {
        return share_content;
    }

    public void setShare_content(String share_content) {
        this.share_content = share_content;
    }


    /**
     * "id": 9,
     * "name": "郑丽鸿",
     * "address": "软件园二期望海路16号之二四楼云颠科技软件公司",
     * "province": "福建省",
     * "province_id": 16068,
     * "city": "厦门市",
     * "city_id": 16278,
     * "area": "思明区",
     * "area_id": 1160,
     * "area_code": 350203,
     * "location": "莲前街道",
     * "location_id": 14970,
     * "detail": "福建省厦门市思明区莲前街道软件园二期望海路16号之二四楼云颠科技软件公司",
     * "zip_code": "351000",
     * "mobile": "18965204187",
     * "thumb": "",
     * "is_default": 1
     */
    private String name, mobile, address, province, province_id, city, city_id, area, area_id, area_code, location, location_id, detail, zip_code, is_default;//编辑地址:收货地址:收货人 手机号码 邮编 详细地址
    private String name1, mobile1, address1, province1, province_id1, city1, city_id1, area1, area_id1, area_code1, location1, location_id1, detail1, zip_code1, is_default1;//添加新地址:收货地址:收货人 手机号码 邮编 详细地址
    private String name2, mobile2, IDnumber2, banknumber2, bankname2, paypswd2, paypswd2_1, pathurl2, province2, province_id2, city2, city_id2, area2, area_id2, area_code2, location2, seekbarnum2, verificationcode2;
    private List<IdcardReq> pathlist;
    private int idimgnum2;// 用来判断身份认证的照片一共多少
    private String storename3, contact3, address3, description3, name3, mobile3, IDnumber3, banknumber3, bankname3, paypswd3, paypswd3_1, province3, province_id3, city3, city_id3, area3, area_id3, area_code3, location3, location_id3;
    private List<StroreimgReq> stroreimglist;
    private List<StorethumbnailReq> stroredetailslist;
    private List<BusinessqfcatReq> businessqfcatlist;

    private int stroreimgnum3, stroredetailsnum3, businessqfcatnum3;// 分别用来判断申请商户（门店缩略图,门店详情,营业资质,身份证照片） 的数量


    //跳转码，用于区别最后从chooseAddressLocation跳转至AddNewAddress还是AddressEdit
    // 1为跳转至AddNewAddress 2为跳转至AddressEdit 3为跳转至身份认证 4为申请商户 5 门店管理
    private int intent_code = 0;


    private int id;//收货地址的id
    private String channelID = "0";//android设备id
    private String message_time, vip_time;


    public String getChannelID() {
        return channelID;
    }

    public void setChannelID(String channelID) {
        this.channelID = channelID;
    }

    public static MyApplication getInstance() {
        if (instance == null) {
            instance = new MyApplication();
        }
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        instance = getInstance();
        DisplayImageOptions displayImageOptions = new DisplayImageOptions.Builder().showImageOnLoading(R.mipmap.ic_launcher).showImageForEmptyUri(R.mipmap.ic_launcher).showImageOnFail(R.mipmap.image_loader).cacheInMemory(true).cacheOnDisk(true).considerExifParams(true).bitmapConfig(Bitmap.Config.RGB_565).build();
        //创建默认的ImageLoader配置参数
        ImageLoaderConfiguration configuration = new ImageLoaderConfiguration.Builder(this).defaultDisplayImageOptions(displayImageOptions).build();
        //Initialize ImageLoader with configuration.
        ImageLoader.getInstance().init(configuration);
    }


    public LoginResp.ResultEntity.DataEntity getDataEntity() {
        return dataEntity;
    }

    public void setDataEntity(LoginResp.ResultEntity.DataEntity dataEntity) {
        this.dataEntity = dataEntity;
    }

    public static void setInstance(MyApplication instance) {
        MyApplication.instance = instance;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getIntent_code() {
        return intent_code;
    }

    public void setIntent_code(int intent_code) {
        this.intent_code = intent_code;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getProvince_id() {
        return province_id;
    }

    public void setProvince_id(String province_id) {
        this.province_id = province_id;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCity_id() {
        return city_id;
    }

    public void setCity_id(String city_id) {
        this.city_id = city_id;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getArea_id() {
        return area_id;
    }

    public void setArea_id(String area_id) {
        this.area_id = area_id;
    }

    public String getArea_code() {
        return area_code;
    }

    public void setArea_code(String area_code) {
        this.area_code = area_code;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getLocation_id() {
        return location_id;
    }

    public void setLocation_id(String location_id) {
        this.location_id = location_id;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getZip_code() {
        return zip_code;
    }

    public void setZip_code(String zip_code) {
        this.zip_code = zip_code;
    }

    public String getIs_default() {
        return is_default;
    }

    public void setIs_default(String is_default) {
        this.is_default = is_default;
    }

    public String getName1() {
        return name1;
    }

    public void setName1(String name1) {
        this.name1 = name1;
    }

    public String getMobile1() {
        return mobile1;
    }

    public void setMobile1(String mobile1) {
        this.mobile1 = mobile1;
    }

    public String getAddress1() {
        return address1;
    }

    public void setAddress1(String address1) {
        this.address1 = address1;
    }

    public String getProvince1() {
        return province1;
    }

    public void setProvince1(String province1) {
        this.province1 = province1;
    }

    public String getProvince_id1() {
        return province_id1;
    }

    public void setProvince_id1(String province_id1) {
        this.province_id1 = province_id1;
    }

    public String getCity1() {
        return city1;
    }

    public void setCity1(String city1) {
        this.city1 = city1;
    }

    public String getCity_id1() {
        return city_id1;
    }

    public void setCity_id1(String city_id1) {
        this.city_id1 = city_id1;
    }

    public String getArea1() {
        return area1;
    }

    public void setArea1(String area1) {
        this.area1 = area1;
    }

    public String getArea_id1() {
        return area_id1;
    }

    public void setArea_id1(String area_id1) {
        this.area_id1 = area_id1;
    }

    public String getArea_code1() {
        return area_code1;
    }

    public void setArea_code1(String area_code1) {
        this.area_code1 = area_code1;
    }

    public String getLocation1() {
        return location1;
    }

    public void setLocation1(String location1) {
        this.location1 = location1;
    }

    public String getLocation_id1() {
        return location_id1;
    }

    public void setLocation_id1(String location_id1) {
        this.location_id1 = location_id1;
    }

    public String getDetail1() {
        return detail1;
    }

    public void setDetail1(String detail1) {
        this.detail1 = detail1;
    }

    public String getZip_code1() {
        return zip_code1;
    }

    public void setZip_code1(String zip_code1) {
        this.zip_code1 = zip_code1;
    }

    public String getIs_default1() {
        return is_default1;
    }

    public void setIs_default1(String is_default1) {
        this.is_default1 = is_default1;
    }

    public String getName2() {
        return name2;
    }

    public void setName2(String name2) {
        this.name2 = name2;
    }

    public String getMobile2() {
        return mobile2;
    }

    public void setMobile2(String mobile2) {
        this.mobile2 = mobile2;
    }

    public String getIDnumber2() {
        return IDnumber2;
    }

    public void setIDnumber2(String IDnumber2) {
        this.IDnumber2 = IDnumber2;
    }

    public String getPathurl2() {
        return pathurl2;
    }

    public void setPathurl2(String pathurl2) {
        this.pathurl2 = pathurl2;
    }

    public String getProvince2() {
        return province2;
    }

    public void setProvince2(String province2) {
        this.province2 = province2;
    }

    public String getProvince_id2() {
        return province_id2;
    }

    public void setProvince_id2(String province_id2) {
        this.province_id2 = province_id2;
    }

    public String getCity_id2() {
        return city_id2;
    }

    public void setCity_id2(String city_id2) {
        this.city_id2 = city_id2;
    }

    public String getCity2() {
        return city2;
    }

    public void setCity2(String city2) {
        this.city2 = city2;
    }

    public String getArea2() {
        return area2;
    }

    public void setArea2(String area2) {
        this.area2 = area2;
    }

    public String getArea_id2() {
        return area_id2;
    }

    public void setArea_id2(String area_id2) {
        this.area_id2 = area_id2;
    }

    public String getLocation2() {
        return location2;
    }

    public void setLocation2(String location2) {
        this.location2 = location2;
    }

    public String getArea_code2() {
        return area_code2;
    }

    public void setArea_code2(String area_code2) {
        this.area_code2 = area_code2;
    }

    public String getBanknumber2() {
        return banknumber2;
    }

    public void setBanknumber2(String banknumber2) {
        this.banknumber2 = banknumber2;
    }

    public String getBankname2() {
        return bankname2;
    }

    public void setBankname2(String bankname2) {
        this.bankname2 = bankname2;
    }

    public String getPaypswd2() {
        return paypswd2;
    }

    public void setPaypswd2(String paypswd2) {
        this.paypswd2 = paypswd2;
    }

    public String getPaypswd2_1() {
        return paypswd2_1;
    }

    public void setPaypswd2_1(String paypswd2_1) {
        this.paypswd2_1 = paypswd2_1;
    }

    public String getProvince3() {
        return province3;
    }

    public void setProvince3(String province3) {
        this.province3 = province3;
    }

    public String getProvince_id3() {
        return province_id3;
    }

    public void setProvince_id3(String province_id3) {
        this.province_id3 = province_id3;
    }

    public String getCity3() {
        return city3;
    }

    public void setCity3(String city3) {
        this.city3 = city3;
    }

    public String getCity_id3() {
        return city_id3;
    }

    public void setCity_id3(String city_id3) {
        this.city_id3 = city_id3;
    }

    public String getArea3() {
        return area3;
    }

    public void setArea3(String area3) {
        this.area3 = area3;
    }

    public String getArea_id3() {
        return area_id3;
    }

    public void setArea_id3(String area_id3) {
        this.area_id3 = area_id3;
    }

    public String getArea_code3() {
        return area_code3;
    }

    public void setArea_code3(String area_code3) {
        this.area_code3 = area_code3;
    }

    public String getLocation3() {
        return location3;
    }

    public void setLocation3(String location3) {
        this.location3 = location3;
    }

    public String getSeekbarnum2() {
        return seekbarnum2;
    }

    public void setSeekbarnum2(String seekbarnum2) {
        this.seekbarnum2 = seekbarnum2;
    }

    public String getVerificationcode2() {
        return verificationcode2;
    }

    public void setVerificationcode2(String verificationcode2) {
        this.verificationcode2 = verificationcode2;
    }

    public List<IdcardReq> getPathlist() {
        return pathlist;
    }

    public void setPathlist(List<IdcardReq> pathlist) {
        this.pathlist = pathlist;
    }

    public String getStorename3() {
        return storename3;
    }

    public void setStorename3(String storename3) {
        this.storename3 = storename3;
    }

    public String getContact3() {
        return contact3;
    }

    public void setContact3(String contact3) {
        this.contact3 = contact3;
    }

    public String getAddress3() {
        return address3;
    }

    public void setAddress3(String adress3) {
        this.address3 = adress3;
    }

    public String getDescription3() {
        return description3;
    }

    public void setDescription3(String description3) {
        this.description3 = description3;
    }

    public String getName3() {
        return name3;
    }

    public void setName3(String name3) {
        this.name3 = name3;
    }

    public String getMobile3() {
        return mobile3;
    }

    public void setMobile3(String mobile3) {
        this.mobile3 = mobile3;
    }

    public String getIDnumber3() {
        return IDnumber3;
    }

    public void setIDnumber3(String IDnumber3) {
        this.IDnumber3 = IDnumber3;
    }

    public String getBanknumber3() {
        return banknumber3;
    }

    public void setBanknumber3(String banknumber3) {
        this.banknumber3 = banknumber3;
    }

    public String getBankname3() {
        return bankname3;
    }

    public void setBankname3(String bankname3) {
        this.bankname3 = bankname3;
    }

    public String getPaypswd3() {
        return paypswd3;
    }

    public void setPaypswd3(String paypswd3) {
        this.paypswd3 = paypswd3;
    }

    public String getPaypswd3_1() {
        return paypswd3_1;
    }

    public void setPaypswd3_1(String paypswd3_1) {
        this.paypswd3_1 = paypswd3_1;
    }


    public List<StroreimgReq> getStroreimglist() {
        return stroreimglist;
    }

    public void setStroreimglist(List<StroreimgReq> stroreimglist) {
        this.stroreimglist = stroreimglist;
    }

    public List<StorethumbnailReq> getStroredetailslist() {
        return stroredetailslist;
    }

    public void setStroredetailslist(List<StorethumbnailReq> stroredetailslist) {
        this.stroredetailslist = stroredetailslist;
    }

    public List<BusinessqfcatReq> getBusinessqfcatlist() {
        return businessqfcatlist;
    }

    public void setBusinessqfcatlist(List<BusinessqfcatReq> businessqfcatlist) {
        this.businessqfcatlist = businessqfcatlist;
    }


    public int getIdimgnum2() {
        return idimgnum2;
    }

    public void setIdimgnum2(int idimgnum2) {
        this.idimgnum2 = idimgnum2;
    }

    public int getStroreimgnum3() {
        return stroreimgnum3;
    }

    public void setStroreimgnum3(int stroreimgnum3) {
        this.stroreimgnum3 = stroreimgnum3;
    }

    public int getStroredetailsnum3() {
        return stroredetailsnum3;
    }

    public void setStroredetailsnum3(int stroredetailsnum3) {
        this.stroredetailsnum3 = stroredetailsnum3;
    }

    public int getBusinessqfcatnum3() {
        return businessqfcatnum3;
    }

    public void setBusinessqfcatnum3(int businessqfcatnum3) {
        this.businessqfcatnum3 = businessqfcatnum3;
    }

    public String getLocation_id3() {
        return location_id3;
    }

    public void setLocation_id3(String location_id3) {
        this.location_id3 = location_id3;
    }

    public String getMessage_time() {
        return message_time;
    }

    public void setMessage_time(String message_time) {
        this.message_time = message_time;
    }

    public String getVip_time() {
        return vip_time;
    }

    public void setVip_time(String vip_time) {
        this.vip_time = vip_time;
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
        System.gc();
    }
}
